{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import seaborn as sn\n",
    "import seaborn as sns; sns.set()\n",
    "import matplotlib.pyplot as plt\n",
    "from pandas.api.types import is_string_dtype, is_numeric_dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "outputs": [],
   "source": [
    "DATA_DIR='./data/train/'\n",
    "train_tag=pd.read_csv(DATA_DIR+'train_tag.csv')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "must be str, not float",
     "output_type": "error",
     "traceback": [
      "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[1;31mTypeError\u001B[0m                                 Traceback (most recent call last)",
      "\u001B[1;32m<ipython-input-24-c6f2be78a354>\u001B[0m in \u001B[0;36m<module>\u001B[1;34m\u001B[0m\n\u001B[0;32m      1\u001B[0m \u001B[0mp_cnt\u001B[0m\u001B[1;33m=\u001B[0m\u001B[0mlen\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mtrain_tag\u001B[0m\u001B[1;33m[\u001B[0m\u001B[0mtrain_tag\u001B[0m\u001B[1;33m[\u001B[0m\u001B[1;34m'flag'\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m==\u001B[0m\u001B[1;36m1\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m      2\u001B[0m \u001B[0mn_cnt\u001B[0m\u001B[1;33m=\u001B[0m\u001B[0mlen\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mtrain_tag\u001B[0m\u001B[1;33m[\u001B[0m\u001B[0mtrain_tag\u001B[0m\u001B[1;33m[\u001B[0m\u001B[1;34m'flag'\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m==\u001B[0m\u001B[1;36m0\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[1;32m----> 3\u001B[1;33m \u001B[0mprint\u001B[0m\u001B[1;33m(\u001B[0m\u001B[1;34m'Positive/Negative={}'\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mfind\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mp_cnt\u001B[0m\u001B[1;33m/\u001B[0m\u001B[0mn_cnt\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0m",
      "\u001B[1;31mTypeError\u001B[0m: must be str, not float"
     ]
    }
   ],
   "source": [
    "p_cnt=len(train_tag[train_tag['flag']==1])\n",
    "n_cnt=len(train_tag[train_tag['flag']==0])\n",
    "print('Positive/Negative={}'.find(p_cnt/n_cnt))"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [],
   "source": [
    "tag_corr=train_tag.corr()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAENCAYAAAARyyJwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3df1RUdf4/8OcwDOiECuoMkB/LNUs7CanZEYlFrWQQGSmkzbRY18CfG8muGqtugKaZW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Lw7bffwmaz4YsvvkCfPn3Qp0+fm6qZfBcvPVGHpVarXebob2hogEqlgvjV9GV2u93lGK1W26K+xf9MgXY9XJxOJ4YPH46VK1dK286fPw+9Xo/du3e7TA3tdDrdhlJzbjS2s2fP3nAMv67114/fEp07d4bBYMCOHTvwzTff4Kmnnrqpesm38YyCOqxhw4ahtLQU5eXlAIB//OMf+Pvf/45z586hoqICQgh89NFHHvfbv39/CCGwd+9eAMCnn36K6upqAMDw4cPx5Zdf4scffwQA7N27F+PGjUNDQwOAa+9fVFdXw+FwYOvWrTecGlqtVuPq1asej+36+we/FhsbC4vFgkuXLsHpdGLbtm0ej/d3v/sdCgsLceDAAem9CqJf4xkFdVj9+/fH3LlzkZaWBuDa92K/+uqreO+99zB+/HjodDqMHDkShw8f9qhfjUaD1atXIycnBytWrMD9998vfalMv379sGjRIvzpT3+CEAL+/v5Yu3atdGnqnnvuwbRp03Dp0iU89NBDmDp1apP+4+Pj8dxzz2HVqlW47777Wjy2pUuX4tSpUy77jRgxAv/+978xfvx4dO3aFQMGDEBVVZVH4x04cCDUajXi4+MRGBjo0bF0e+A040REJItnFHRb2r59O959990bbjMajdIreSXNnj0bJ0+evOE2k8mEvn373nTfGzZsgNlsvuG2559/HuPGjbvpvun2wzMKIiKSxTeziYhIFoOCiIhkMSiIiEgWg4KIiGQxKIiISNb/B/9p9qzTe6FFAAAAAElFTkSuQmCC\n"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[1;31mKeyboardInterrupt\u001B[0m                         Traceback (most recent call last)",
      "\u001B[1;32m<ipython-input-18-25c7c5c22afe>\u001B[0m in \u001B[0;36m<module>\u001B[1;34m\u001B[0m\n\u001B[0;32m     29\u001B[0m     \u001B[1;34m'pl_crd_lmt_cd'\u001B[0m\u001B[1;33m:\u001B[0m\u001B[1;34m'个贷授信总额度分层'\u001B[0m\u001B[1;33m,\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m     30\u001B[0m }\n\u001B[1;32m---> 31\u001B[1;33m \u001B[1;32mfor\u001B[0m \u001B[0mk\u001B[0m\u001B[1;33m,\u001B[0m\u001B[0mv\u001B[0m \u001B[1;32min\u001B[0m \u001B[0mstr_names\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mitems\u001B[0m\u001B[1;33m(\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m:\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0m\u001B[0;32m     32\u001B[0m     \u001B[0mdata\u001B[0m \u001B[1;33m=\u001B[0m \u001B[0mtrain_tag\u001B[0m\u001B[1;33m[\u001B[0m\u001B[1;33m[\u001B[0m\u001B[1;34m'flag'\u001B[0m\u001B[1;33m,\u001B[0m\u001B[0mk\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m     33\u001B[0m     \u001B[0max\u001B[0m \u001B[1;33m=\u001B[0m \u001B[0msns\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mbarplot\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mx\u001B[0m\u001B[1;33m=\u001B[0m\u001B[0mk\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0my\u001B[0m\u001B[1;33m=\u001B[0m\u001B[1;34m\"flag\"\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mdata\u001B[0m\u001B[1;33m=\u001B[0m\u001B[0mdata\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n",
      "\u001B[1;32m<ipython-input-18-25c7c5c22afe>\u001B[0m in \u001B[0;36m<module>\u001B[1;34m\u001B[0m\n\u001B[0;32m     29\u001B[0m     \u001B[1;34m'pl_crd_lmt_cd'\u001B[0m\u001B[1;33m:\u001B[0m\u001B[1;34m'个贷授信总额度分层'\u001B[0m\u001B[1;33m,\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m     30\u001B[0m }\n\u001B[1;32m---> 31\u001B[1;33m \u001B[1;32mfor\u001B[0m \u001B[0mk\u001B[0m\u001B[1;33m,\u001B[0m\u001B[0mv\u001B[0m \u001B[1;32min\u001B[0m \u001B[0mstr_names\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mitems\u001B[0m\u001B[1;33m(\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m:\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0m\u001B[0;32m     32\u001B[0m     \u001B[0mdata\u001B[0m \u001B[1;33m=\u001B[0m \u001B[0mtrain_tag\u001B[0m\u001B[1;33m[\u001B[0m\u001B[1;33m[\u001B[0m\u001B[1;34m'flag'\u001B[0m\u001B[1;33m,\u001B[0m\u001B[0mk\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m]\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m     33\u001B[0m     \u001B[0max\u001B[0m \u001B[1;33m=\u001B[0m \u001B[0msns\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mbarplot\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mx\u001B[0m\u001B[1;33m=\u001B[0m\u001B[0mk\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0my\u001B[0m\u001B[1;33m=\u001B[0m\u001B[1;34m\"flag\"\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mdata\u001B[0m\u001B[1;33m=\u001B[0m\u001B[0mdata\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n",
      "\u001B[1;32m_pydevd_bundle\\pydevd_cython_win32_37_64.pyx\u001B[0m in \u001B[0;36m_pydevd_bundle.pydevd_cython_win32_37_64.SafeCallWrapper.__call__\u001B[1;34m()\u001B[0m\n",
      "\u001B[1;32m_pydevd_bundle\\pydevd_cython_win32_37_64.pyx\u001B[0m in \u001B[0;36m_pydevd_bundle.pydevd_cython_win32_37_64.PyDBFrame.trace_dispatch\u001B[1;34m()\u001B[0m\n",
      "\u001B[1;32m_pydevd_bundle\\pydevd_cython_win32_37_64.pyx\u001B[0m in \u001B[0;36m_pydevd_bundle.pydevd_cython_win32_37_64.PyDBFrame.trace_dispatch\u001B[1;34m()\u001B[0m\n",
      "\u001B[1;32m_pydevd_bundle\\pydevd_cython_win32_37_64.pyx\u001B[0m in \u001B[0;36m_pydevd_bundle.pydevd_cython_win32_37_64.PyDBFrame.trace_dispatch\u001B[1;34m()\u001B[0m\n",
      "\u001B[1;32m_pydevd_bundle\\pydevd_cython_win32_37_64.pyx\u001B[0m in \u001B[0;36m_pydevd_bundle.pydevd_cython_win32_37_64.PyDBFrame.do_wait_suspend\u001B[1;34m()\u001B[0m\n",
      "\u001B[1;32mC:\\Program Files\\JetBrains\\PyCharm 2020.1\\plugins\\python\\helpers\\pydev\\pydevd.py\u001B[0m in \u001B[0;36mdo_wait_suspend\u001B[1;34m(self, thread, frame, event, arg, send_suspend_message, is_unhandled_exception)\u001B[0m\n\u001B[0;32m   1101\u001B[0m \u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m   1102\u001B[0m         \u001B[1;32mwith\u001B[0m \u001B[0mself\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0m_threads_suspended_single_notification\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mnotify_thread_suspended\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mthread_id\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mstop_reason\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m:\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[1;32m-> 1103\u001B[1;33m             \u001B[0mself\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0m_do_wait_suspend\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mthread\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mframe\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mevent\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0marg\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0msuspend_type\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mfrom_this_thread\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0m\u001B[0;32m   1104\u001B[0m \u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m   1105\u001B[0m     \u001B[1;32mdef\u001B[0m \u001B[0m_do_wait_suspend\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mself\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mthread\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mframe\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mevent\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0marg\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0msuspend_type\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mfrom_this_thread\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m:\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n",
      "\u001B[1;32mC:\\Program Files\\JetBrains\\PyCharm 2020.1\\plugins\\python\\helpers\\pydev\\pydevd.py\u001B[0m in \u001B[0;36m_do_wait_suspend\u001B[1;34m(self, thread, frame, event, arg, suspend_type, from_this_thread)\u001B[0m\n\u001B[0;32m   1116\u001B[0m \u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m   1117\u001B[0m                 \u001B[0mself\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mprocess_internal_commands\u001B[0m\u001B[1;33m(\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[1;32m-> 1118\u001B[1;33m                 \u001B[0mtime\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0msleep\u001B[0m\u001B[1;33m(\u001B[0m\u001B[1;36m0.01\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0m\u001B[0;32m   1119\u001B[0m \u001B[1;33m\u001B[0m\u001B[0m\n\u001B[0;32m   1120\u001B[0m         \u001B[0mself\u001B[0m\u001B[1;33m.\u001B[0m\u001B[0mcancel_async_evaluation\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mget_current_thread_id\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mthread\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m,\u001B[0m \u001B[0mstr\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mid\u001B[0m\u001B[1;33m(\u001B[0m\u001B[0mframe\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m)\u001B[0m\u001B[1;33m\u001B[0m\u001B[1;33m\u001B[0m\u001B[0m\n",
      "\u001B[1;31mKeyboardInterrupt\u001B[0m: "
     ]
    }
   ],
   "source": [
    "str_names={\n",
    "    'cur_debit_crd_lvl':'招行借记卡持卡最高等级代码',\n",
    "    'hld_crd_card_grd_cd':'招行信用卡持卡最高等级代码',\n",
    "    'crd_card_act_ind':'信用卡活跃标识',\n",
    "    'l1y_crd_card_csm_amt_dlm_cd':'最近一年信用卡消费金额分层',\n",
    "    'atdd_type':'信用卡还款方式',\n",
    "    'perm_crd_lmt-_cd':'信用卡永久信用额度分层',\n",
    "    'gdr_cd':'性别',\n",
    "    'mrg_situ_cd':'婚姻',\n",
    "    'edu_deg_cd':'教育程度',\n",
    "    'acdm_deg_cd':'学历',\n",
    "    'deg_cd':'学位',\n",
    "    'ic_ind':'工商标识',\n",
    "    'fr_or_sh_ind':'法人或股东标识',\n",
    "    'dnl_mbl_bnk_ind':'下载并登录招行APP标识',\n",
    "    'dnl_bind_cmb_lif_ind':'下载并绑定掌上生活标识',\n",
    "    'hav_car_grp_ind':'有车一族标识',\n",
    "    'hav_hou_grp_ind':'有房一族标识',\n",
    "    'l6mon_agn_ind':'近6个月代发工资标识',\n",
    "    'vld_rsk_ases_ind':'有效投资风险评估标识',\n",
    "    'fin_rsk_ases_grd_cd':'用户理财风险承受能力等级代码',\n",
    "    'confirm_rsk_ases_lvl_typ_cd':'投资强风评等级类型代码',\n",
    "    'cust_inv_rsk_endu_lvl_cd':'用户投资风险承受级别',\n",
    "    'l6mon_daim_aum_cd':'近6个月月日均AUM分层',\n",
    "    'tot_ast_lvl_cd':'总资产级别代码',\n",
    "    'pot_ast_lvl_cd':'潜力资产等级代码',\n",
    "    'bk1_cur_year_mon_avg_agn_amt_cd':'本年月均代发金额分层',\n",
    "    'loan_act_ind':'贷款用户标识',\n",
    "    'pl_crd_lmt_cd':'个贷授信总额度分层',\n",
    "}\n",
    "for k,v in str_names.items():\n",
    "    data = train_tag[['flag',k]]\n",
    "    ax = sns.barplot(x=k, y=\"flag\", data=data)\n",
    "    plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "for x_name in list(train_tag.columns):\n",
    "    data = train_tag[['flag',x_name]]\n",
    "    ax = sns.scatterplot(x=x_name, y=\"age\", data=train_tag)\n",
    "    plt.show()\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "name": "pycharm-28004bf6",
   "language": "python",
   "display_name": "PyCharm (Nopimal)"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}